GCancellable *cancellable,
GError **error)
{
+ OstreeDeployment *booted_deployment = ostree_sysroot_get_booted_deployment (self);
+ if (booted_deployment == NULL)
+ return glnx_throw (error, "Cannot stage a deployment when not currently booted into an OSTree system");
+
/* This is a bit of a hack. When adding a new service we have to end up getting
* into the presets for downstream distros; see e.g. https://src.fedoraproject.org/rpms/ostree/pull-request/7
*
set -euo pipefail
-echo "1..$((23 + ${extra_admin_tests:-0}))"
+echo "1..$((24 + ${extra_admin_tests:-0}))"
function validate_bootloader() {
cd ${test_tmpdir};
${CMD_PREFIX} ostree admin status
echo "ok layout"
+if ${CMD_PREFIX} ostree admin deploy --stage --os=testos testos:testos/buildmaster/x86_64-runtime 2>err.txt; then
+ fatal "staged when not booted"
+fi
+assert_file_has_content_literal err.txt "Cannot stage a deployment when not currently booted into an OSTree system"
+echo "ok staging does not work when not booted"
+
orig_mtime=$(stat -c '%.Y' sysroot/ostree/deploy)
${CMD_PREFIX} ostree admin deploy --os=testos testos:testos/buildmaster/x86_64-runtime
new_mtime=$(stat -c '%.Y' sysroot/ostree/deploy)